<?php echo $this->renderElement('admin/menu'); ?>
<br />

<?php echo $html->link("Add receiptbook", '/receiptbooks/add')."<br /><br />"; ?>
<h2><?php echo "Liste des Carnets" ?></h2>
<br />

<table width="100%">
<th>#id</th><th><?php echo "Nom"; ?></th><th><?php echo __('company'); ?></th><th><?php echo "Montant"; ?></th><th><?php echo "Montant restant"; ?></th><th><?php echo "Date de fin"; ?></th><th>Status</th><th>Actions</th>

<?php
	foreach($receiptbooks as $rb):
		echo "<tr>";
		echo "<td>".$html->link("#".$rb['Receiptbook']['id'], '/receiptbooks/edit/'.$rb['Receiptbook']['id'])."</td>";
		echo "<td>".$html->link($rb['Receiptbook']['name'], '/receiptbooks/edit/'.$rb['Receiptbook']['id'])."</td>";
		echo "<td>".$rb['Company']['name']."</td>";
		echo "<td>".$rb['Receiptbook']['amount']."</td>";
		echo "<td>".$rb['Receiptbook']['free_amount']."</td>";
		echo "<td>".$rb['Receiptbook']['close_date']."</td>";
		echo "<td>".$rb['Receiptbook']['status']."</td>";
		echo "<td>".$html->link(__('edit', true), '/receiptbooks/edit/'.$rb['Receiptbook']['id'])." | ".$html->link(__('delete', true), '/receiptbooks/del/'.$rb['Receiptbook']['id'])."</td>";				
		echo "</tr>";
	endforeach;
?>

</table>

